package com.yuanlp.shoppingmall.shoppingcart.adapter;

import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.view.ViewGroup;

import com.yuanlp.shoppingmall.R;

/**
 * Created by 原立鹏 on 2017/8/18.
 */

public class ShoppingAdapter extends RecyclerView.Adapter {

    private Context mContext;
    /**
     * 接收shoppingFragment里，new这个适配器时，传过来的context和数据
     */
    public ShoppingAdapter(Context context,Object object){

        this.mContext=context;
    }

    @Override
    public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {

        //测试数据
        View view=View.inflate(mContext, R.layout.fragement_home,null);
        return new ShoppingViewHolder(view);
    }


    @Override
    public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {

    }


    @Override
    public int getItemCount() {
        return 1;
    }

    class ShoppingViewHolder extends RecyclerView.ViewHolder{

        public ShoppingViewHolder(View itemView) {
            super(itemView);
        }
    }
}
